package com.opsad.niceread.presenter;


import com.opsad.niceread.ui.viewInf.IBaseViewInf;

import rx.Subscription;

/**
 * Author: Othershe
 * Time:  2016/8/11 11:17
 */
public class BasePresenter<V extends IBaseViewInf> {
    public V mViewInf;
    protected Subscription mSubscription;

    public BasePresenter(V viewInf){
        mViewInf = viewInf;
    }

    public void detach() {
        mViewInf = null;
        if (mSubscription != null) {
            mSubscription.unsubscribe();
        }
    }
}
